package com.kelaite.procurement.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.kelaite.procurement.entity.TCompany;
import com.kelaite.procurement.entity.TPurchaseOrganization;

public interface PurchaseOrganizationRepository extends JpaRepository<TPurchaseOrganization, Long>{
	
	public List<TPurchaseOrganization> findByTCompany(TCompany tCompany);
	
	@Query(value = "select count(*) from t_purchase_organization where organization_no =?1")
	public int countByPurchaseOrgAndOrgNo(String organizationNo);
}
